package cn;

import cn.conf.SpringConf;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import cn.service.UserService;

public class App {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConf.class);
        UserService service = (UserService) applicationContext.getBean("userService");
        service.say();
        /**
         * 结果
         * Hello Spring ！ 我用annotation方式入门了！
         */
    }
}
